import request from "@/util/request.js";

export function reqGetMenuTreeList(query) {
    return request({
        url: '/system/menu/tree/list',
        method: 'get',
        params: query
    })
}
export function reqCreateMenu(data) {
    return request({
        url: '/system/menu',
        method: 'post',
        data
    })
}

export function reqUpdateMenu(data) {
    return request({
        url: '/system/menu',
        method: 'put',
        data
    })
}
export function reqDeleteMenuById(id) {
    return request({
        url: '/system/menu/' + id,
        method: 'delete',
    })
}
export function reqGetMenuListByRoleId(roleId) {
    return request({
        url: '/system/menu/list/by/role/' + roleId,
        method: 'get',
    })
}
export function reqGetParentMenuList(){
    return request({
        url: '/system/menu/tree/list/parent-menu',
        method: 'get',
    })
}
